package com.zwps.common.api.model.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Schema(description = "分页")
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
public class PageInfoDTO {

    /**
     * 当前页
     */
    @Schema(description = "当前页，默认1")
    private Integer pageNum;
    
    /**
     * 每页的数量
     */
    @Schema(description = "每页的条数，默认15")
    private Integer pageSize;

    public Integer getPageNum() {
        if (pageNum == null) {
            return 1;
        }
        return pageNum;
    }

    public Integer getPageSize() {
        if (pageSize == null) {
            return 15;
        }
        return pageSize;
    }
    
}
